﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace NNImage
{
    public partial class Wynik : Form
    {
        public Wynik(Bitmap bitmapa)
        {
            InitializeComponent();
            if ((bitmapa.Size.Height < SystemInformation.PrimaryMonitorSize.Height) && (bitmapa.Size.Width < SystemInformation.PrimaryMonitorSize.Width))
            {
                this.Width = bitmapa.Width + 32;
                this.Height = bitmapa.Height + 58;
            }
            else
                this.Size = SystemInformation.WorkingArea.Size;
            pictureBox.Size = bitmapa.Size;
            pictureBox.Image = bitmapa;
        }

        private void Wynik_Resize(object sender, EventArgs e)
        {
            panel.Width = this.Size.Width - 32;
            panel.Height = this.Size.Height - 58;
        }
    }
}
